import { createMemoryHistory, createRouter,createWebHashHistory } from 'vue-router'

import Login from '@/views/Login.vue'
import Manager from '@/views/AfterLogin/Manager.vue'
import Departmanager from '@/views/Authority/Departmanager.vue'
import Positionmanager from '@/views/Authority/Positionmanager.vue'
import Personmanager from '@/views/Authority/Personmanager.vue'
import Index from '@/views/Home/Index.vue'
import Salarymanager from '@/views/Salary/Salarymanager.vue'


const routes = [
    {
        path:'/',
        redirect:'/login'
    },
    { path:'/login',component: Login },
    
    { path:'/manager',redirect:'/manager/index',component: Manager,
        children:[{
            path:'index',component: Index
        },{
            path:'departmanager',component: Departmanager
        },{
            path:'positionmanager',component: Positionmanager
        },{
            path:'personmanager',component: Personmanager
        },{
            path:'salarymanager',component: Salarymanager
        }]
     }
]

const router = createRouter({
    history: createWebHashHistory(),
    routes,
  })

  export default router